package cn.timeoverflow.bean;

import javax.persistence.MappedSuperclass;

import cn.timeoverflow.util.ExtendedWxGsonBuilder;

@MappedSuperclass
public class DeviceEvent {
		String device_id;
	    String device_type;
	    String msg_id;
	    String msg_type;
	    String create_time;
	    String open_id;
	    String session_id;
	    String content;
	    String qrcode_suffix_data;
		public DeviceEvent(String device_id, String device_type, String msg_id, String msg_type, String create_time,
				String open_id, String session_id, String content, String qrcode_suffix_data) {
			super();
			this.device_id = device_id;
			this.device_type = device_type;
			this.msg_id = msg_id;
			this.msg_type = msg_type;
			this.create_time = create_time;
			this.open_id = open_id;
			this.session_id = session_id;
			this.content = content;
			this.qrcode_suffix_data = qrcode_suffix_data;
		}
		public DeviceEvent() {
			// TODO Auto-generated constructor stub
		}
		public String getDevice_id() {
			return device_id;
		}
		public void setDevice_id(String device_id) {
			this.device_id = device_id;
		}
		public String getDevice_type() {
			return device_type;
		}
		public void setDevice_type(String device_type) {
			this.device_type = device_type;
		}
		public String getMsg_id() {
			return msg_id;
		}
		public void setMsg_id(String msg_id) {
			this.msg_id = msg_id;
		}
		public String getMsg_type() {
			return msg_type;
		}
		public void setMsg_type(String msg_type) {
			this.msg_type = msg_type;
		}
		public String getCreate_time() {
			return create_time;
		}
		public void setCreate_time(String create_time) {
			this.create_time = create_time;
		}
		public String getOpen_id() {
			return open_id;
		}
		public void setOpen_id(String open_id) {
			this.open_id = open_id;
		}
		public String getSession_id() {
			return session_id;
		}
		public void setSession_id(String session_id) {
			this.session_id = session_id;
		}
		public String getContent() {
			return content;
		}
		public void setContent(String content) {
			this.content = content;
		}
		public String getQrcode_suffix_data() {
			return qrcode_suffix_data;
		}
		public void setQrcode_suffix_data(String qrcode_suffix_data) {
			this.qrcode_suffix_data = qrcode_suffix_data;
		}
		public static DeviceEvent fromJson(String str){
			return ExtendedWxGsonBuilder.create().fromJson(str, DeviceEvent.class);
		}
}
